//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopUserFavorite, MinishopUserFavoriteResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopUserFavoriteList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopUserFavoriteResponse>(`/uctoo/minishop_user_favorite/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopUserFavorite = async (id: string) => {
  return requestClient.get<MinishopUserFavorite>(`/uctoo/minishop_user_favorite/${id}`);
};

export const adductooMinishopUserFavorite = async (data: Partial<MinishopUserFavorite>) => {
  return requestClient.post<MinishopUserFavorite>('/uctoo/minishop_user_favorite/add', data);
};

export const edituctooMinishopUserFavorite = async (data: Partial<MinishopUserFavorite>) => {
  return requestClient.post<MinishopUserFavorite>('/uctoo/minishop_user_favorite/edit', data);
};

export const deleteuctooMinishopUserFavorite = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_user_favorite/del', { id });
};
